package com.suxin.web;

import lombok.Data;

import java.util.UUID;
import java.util.concurrent.CompletableFuture;

/**
 * @author Tang
 * @classname Request
 * @description [  ]
 * @date 2022/12/30 14:57
 */
@Data
public class Request<T,M> {

    private String requestId;

    private M params;

    private CompletableFuture<T> future;

    private long timeOut;

    public void init() {
        this.requestId = UUID.randomUUID().toString();
        this.future = new CompletableFuture<>();
    }

}
